<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>个人中心</title>
    <link rel="stylesheet" href="../../layui/css/layui.css">
    <script src="../../layui/layui.js"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">在线考试系统</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <!-- 移动端显示 -->
            <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
                <i class="layui-icon layui-icon-spread-left"></i>
            </li>

            <li class="layui-nav-item layui-hide-xs"><a href="">刷新</a></li>

        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:;">
                    <img src="//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"
                         class="layui-nav-img">
                    student
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="information_page.html">个人中心</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a href="/index.html">退出
                </a>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">考试系统</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" data-id="1" data-title="个人中心">个人中心</a></dd>
                        <dd><a href="select_page.html" data-id="1" data-title="试卷选择">试卷选择</a></dd>
                    </dl>
                </li>
            </ul>

        </div>
    </div>
    <div class="layui-body">
        <div class="layui-tab">
            <ul class="layui-tab-title">
                <li class="layui-this">个人中心</li>
            </ul>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>学号</th>
                    <th>姓名</th>
                    <th>手机号码</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td id="xuehao"></td>
                    <td id="xingming"></td>
                    <td id="shoujihao"></td>
                </tr>
                </tbody>
            </table>
            <div style="margin-left: 1000px">
                <button class="layui-btn layui-btn-radius layui-btn-normal" onclick="f2()" style="font-size: 20px">
                    修改信息
                </button>
            </div>

        </div>
    </div>
    <div class="layui-footer" style="text-align: center">
        <!-- 底部固定区域 -->
        ©版权 西北农林科技大学
    </div>
</div>
<script type="text/html" id="bar2" lay-filter="test">已读
</script>
<script>
    //JS
    function f2() {
        window.location.href = 'information_update_page.html';
    }

    layui.use(['element', 'layer', 'util', 'table'], function () {
        var element = layui.element
            , layer = layui.layer
            , util = layui.util
            , $ = layui.$
            , table = layui.table;

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function (othis) {
                layer.msg('展开左侧菜单的操作', {icon: 0});
            }
        });

        $.post("/student/selectOne",
            {},
            function (data) {
                console.log(data);
                document.getElementById("xuehao").innerText = data.stuid;
                document.getElementById("xingming").innerText = data.stuname;
                document.getElementById("shoujihao").innerText = data.tel;
            });
    });
</script>
</body>
</html>